package com.lyf.scm.plan.domain.convertor;

import com.lyf.scm.plan.api.dto.DemandPlanDTO;
import com.lyf.scm.plan.api.dto.SalesPlanDirectlyDTO;
import com.lyf.scm.plan.api.dto.SalesPlanOtherDTO;
import com.lyf.scm.plan.insfrastructure.db.dataobject.DemandPlanDO;
import com.lyf.scm.plan.insfrastructure.db.dataobject.SalesPlanOtherDO;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * description:
 *      需求计划转换器
 * @author: haodong
 * @data: 2020/8/7 16:34
 */
@Mapper(componentModel = "spring")
public interface DemandPlanConvertor extends BaseConvertor<DemandPlanDTO, DemandPlanDO>{

    /**
     * 销售直营计划转需求计划do
     *
     * @param salesPlanDirectlyDTO 销售计划直接dto
     * @return {@link DemandPlanDO}
     */
    DemandPlanDO salesPlanDirectlyDtoToDO (SalesPlanDirectlyDTO salesPlanDirectlyDTO);


    /**
     * 其他渠道销售计划转do
     *
     * @param salesPlanOtherDTO 销售计划其他dto
     * @return {@link DemandPlanDO}
     */
    DemandPlanDO salesPlanOtherDtoToDO(SalesPlanOtherDTO salesPlanOtherDTO);


    /**
     * 其他销售计划转需求计划DTO
     *
     * @param salesPlanOtherDOS 销售计划其他dto
     * @return {@link List<DemandPlanDO>}
     */
    List<DemandPlanDO> salesOtherListToDO(List<SalesPlanOtherDO> salesPlanOtherDOS);
}
